/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.util.Date;
import java.util.List;
import javax.persistence.*;

/**
 *
 * @author USUARIO
 */
@Entity
@DiscriminatorValue("owner")
public class Owner extends Person{
    
    @OneToMany(mappedBy = "owner")
    private List<Pet> pets;

    public Owner() {
    }
    
    public Owner(int ssn, String name, String lastName, Date bDay, String bPlace){
        super(ssn, name, lastName, bDay, bPlace);
        pets = null;
    }

    /**
     * @return the pets
     */
    public List<Pet> getPets() {
        return pets;
    }

    /**
     * @param pets the pets to set
     */
    public void setPets(List<Pet> pets) {
        this.pets = pets;
    }
}
